-- GENERATED SPELL FOR [Firemane Flamecaller] --


function spell0_4334(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(18968,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4334', 0, 1)
end

function spell1_4334(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4334', 3000, 1)
end

function spell2_4334(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(11990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4334', 9000, 1)
end

function Sorts_4334(pUnit, Event)
local choix_sorts_4334 = math.random(0, 2)
if choix_sorts_4334 == 0 then
pUnit:RegisterEvent('spell0_4334', 1, 1)
end
if choix_sorts_4334 == 1 then
pUnit:RegisterEvent('spell1_4334', 1, 1)
end
if choix_sorts_4334 == 2 then
pUnit:RegisterEvent('spell2_4334', 1, 1)
end
end

function mob4334_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4334', math.random(1500, 3000), 1)
end

function mob4334_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4334_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4334_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4334, 1, 'mob4334_Action')
RegisterUnitEvent(4334, 2, 'mob4334_Leave')
RegisterUnitEvent(4334, 3, 'mob4334_Kill')
RegisterUnitEvent(4334, 4, 'mob4334_Die')
